<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>超市收银系统</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <style type="text/css">
        .providerAdd{
            line-height: 50px;
            width: 99%;
            border: 1px solid #e0f0fd;
            margin: 0 5px;
            background-color: rgba(32, 163, 255, 0.18);
            padding-bottom: 20px;
        }
        #conAdd {
            line-height: 50px;
            width: 50%;
            height: 90%;

            margin:0 auto;
            margin-bottom: 80px;

        }
        .add {
            width: 80%;
            line-height: 45px;
            margin: 20px 32%;
            font-size: 22px;
            font-weight: bold;
        }
        .add input {
            display: inline;
            width: 20%;
            height: 30px;
        }
        .add select {
            display: inline;
            width: 20%;
            height: 30px;
        }
        .providerAddBtn {
            margin-top: 40px;

        }
        .providerAdd input[type="button"]{
            width: 8%;

            font-size: 25px;
            background-color: rgba(10, 94, 182, 0.42);
        }
        .providerAdd input[value="保存"]{
            position:absolute;
            margin: 0;
            right:51%;
        }
        .providerAdd input[value="返回"]{
            position:absolute;
            margin: 0;
            right:41%;
        }
    </style>
</head>
<body>

<div class="providerAdd">
    <form id="conAdd">
        <div class="add first">
            <span>用户账号：</span>
            <input type="text" name="userName" id="userName" value="">
        </div>

        <div class="add">
            <span>客户电话：</span>
            <input type="text"  name="phone" id="phone" value="">
        </div>
        <div class="add">
            <span>客户性别：</span>
            <select name="sex" id="sex">
                <option value="2" selected="selected">男</option>
                <option value="1">女</option>
                <option value="0">保密</option>
            </select>
        </div>
        <div class="add">
            <span>客户地址：</span>
            <input  type="text" name="address" id="address"  value="">
        </div>
        <div class="providerAddBtn">
            <input type="button" name="add" id="add" value="保存" >
            <input type="button" id="back" name="back" value="返回" >
        </div>
    </form>
</div>


</body>
<script src="/js/jquery-2.2.1.min.js"></script>
<script src="/js/jump.js"></script>
<script type="text/javascript">

    $(".providerAddBtn :button[value='保存']").bind("click", function() {
        /* 表单验证 */

        /* 确认提示 */
        if(!confirm("确定保存新用户信息吗?")) return;
        location = "/con/save?"+$("#conAdd").serialize()
    });
    $(".providerAddBtn :button[value='返回']").bind("click", function() {
        location = "/con/query?"
    });
</script>

</html>